package com.ing5.BL.android.cinece.api.client;

import android.util.Log;

import com.ing5.BL.android.cinece.api.model.SearchResults;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class GetSearch extends AbstractRequest<SearchResults> {

	public GetSearch(String query){
        query = query.trim();

        try {
            query = URLEncoder.encode(query, "UTF-8");
        } catch (UnsupportedEncodingException e) {
        	Log.e("DEBUG", "Error - getSearch: " + e);
        }

        uri = "http://www.omdbapi.com/?r=json&s=" + query;
	}
	
	protected Class<SearchResults> getResultType() {
        return SearchResults.class;
    }
}
